package org.sith.taskrunner.filters.filters;

import org.sith.taskrunner.ejb.services.UserManagerService;

import javax.ejb.EJB;
import javax.servlet.*;
import java.io.IOException;


public class EncodingFilter implements Filter {

    @EJB(name = "UserManagerServiceEJB")
    private UserManagerService userManagerService;




    public void destroy() {
    }

    public void doFilter(ServletRequest request,
                         ServletResponse response, FilterChain chain)
            throws IOException, ServletException {
        response.setCharacterEncoding("UTF-8");
        request.setCharacterEncoding("UTF-8");
        chain.doFilter(request, response);
    }

    public void init(FilterConfig config) throws ServletException {

    }

}
